package others;

public enum  ResponseCode {
    LOGIN_SUCCESS(0,"登陆成功"),
    REGISTER_SUCCESS(0,"注册成功"),
    SEARCH_SUCCESS(0,"查询成功"),
    INSERT_SUCCESS(0,"添加成功"),

    USERNAME_NOT_EMPTY(101,"用户名不能为空"),
    PASSWORD_NOT_EMPTY(102,"密码不能为空"),
    PARAMETER_NOT_EMPTY(103,"参数不能为空"),
    USER_NOT_LOGIN(104,"用户未登陆"),
    USER_NOT_MEMBERS(105,"该用户不是账本成员"),
    USER_NOT_EXISTS(106,"用户不存在"),
    RECORD_NOT_EXISTS(107,"暂无收支记录"),
    INFORMATION_NOT_EXISTS(108,"暂无信息"),

    USERNAME_ALREADY_EXISTS(202,"用户已经注册"),
    USER_ALREADY_MEMBERS(203,"用户已经是该账本成员"),

    PASSWORD_ERROR(301,"密码错误"),
    PARAMETER_ERROR(302,"参数错误"),

    REGISTER_FAIL(401,"注册失败，请重新尝试"),
    INSERT_FAIL(402,"添加失败，请重新尝试"),
    UPDATE_FAIL(403,"更新失败,请重新尝试"),
    DELETE_FAIL(404,"删除失败，请重新尝试"),
    INVITE_FAIL(405,"邀请失败,请重新尝试"),
    RESPONSE_FAIL(406,"回应失败，请重新尝试"),
    SET_BUDGET_FAIL(407,"设置预算失败，请重新尝试"),

    BUDGET_OVERRUN(501,"预算超支")
    ;

    private int code;
    private String msg;

    ResponseCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}